<template>
  <div class="box">
    <Header />
    <div class="content">
      <h2>我的收藏</h2>
      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" :stretch="true">
        <el-tab-pane label="小说" name="first">
          <div class="dis-flex">
            <el-dropdown trigger="click">
              <span class="el-dropdown-link">
                最近收藏
                <el-icon class="el-icon--right" :size="16">
                  <ArrowDown />
                </el-icon>
              </span>
              <template #dropdown>
                <el-dropdown-menu>
                  <el-dropdown-item>最近收藏</el-dropdown-item>
                  <el-dropdown-item>最近更新</el-dropdown-item>
                </el-dropdown-menu>
              </template>
            </el-dropdown>
          </div>

          <div class="first-list">
            <div class="item" v-for="(item, index) in 4" :key="index">
              <div class="image">
                <img src="../assets/images/book1.jpg" alt />
              </div>
              <div class="right-box">
                <div class="title-box top10 space-between">
                  <div class="title-header">《法老的聖眷：內弗爾卡拉的召喚》</div>
                </div>

                <div class="content-box content-box-name top10">作者名字</div>

                <div class="dis-row gong-tips content-box top10">
                  【公告】作品即將轉為付费閱部
                  <div class="point-red">
                    <span>·</span>有更新
                  </div>
                </div>

                <div class="content-box top10 space-between" v-if="index == 0">
                  <div>3分钟前</div>
                  <div class="baifen-number">0%</div>
                </div>
                <div class="content-box top10 space-between" v-if="index == 1">
                  <div>2小时前</div>
                  <div class="baifen-number">0%</div>
                </div>
                <div class="content-box top10 space-between" v-if="index == 2">
                  <div>month-day</div>
                  <div class="baifen-number">0%</div>
                </div>
                <div class="content-box top10 space-between" v-if="index == 3">
                  <div>year-month-day</div>
                  <div class="baifen-number">0%</div>
                </div>
              </div>

              <!-- <el-text class="h5" truncated>藍光 Hikari Aoi</el-text> -->
              <!-- <el-text class="p" line-clamp="2">（第三十二章）來自冥神內爾伽勒的救贖</el-text> -->
            </div>
            <!-- <div class="item">
              <div class="image">
                <img src="../assets/images/book1.jpg" alt />
              </div>
              <div class="text">
                <el-text class="h3" truncated>
                  《法老的聖眷：內弗爾卡拉的召喚》The Royal Grace from Great
                  Pharaoh
                </el-text>
                <el-text class="h5" truncated>藍光 Hikari Aoi</el-text>
                <el-text class="p" line-clamp="2">（第三十二章）來自冥神內爾伽勒的救贖</el-text>
              </div>
            </div>
            <div class="item">
              <div class="image">
                <img src="../assets/images/book1.jpg" alt />
              </div>
              <div class="text">
                <el-text class="h3" truncated>
                  《法老的聖眷：內弗爾卡拉的召喚》The Royal Grace from Great
                  Pharaoh
                </el-text>
                <el-text class="h5" truncated>藍光 Hikari Aoi</el-text>
                <el-text class="p" line-clamp="2">（第三十二章）來自冥神內爾伽勒的救贖</el-text>
              </div>
            </div>-->
          </div>
        </el-tab-pane>
        <el-tab-pane label="漫画" name="second">
          <div class="dis-flex">
            <el-dropdown trigger="click">
              <span class="el-dropdown-link">
                最近收藏
                <el-icon class="el-icon--right" :size="16">
                  <ArrowDown />
                </el-icon>
              </span>
              <template #dropdown>
                <el-dropdown-menu>
                  <el-dropdown-item>最近收藏</el-dropdown-item>
                  <el-dropdown-item>最近更新</el-dropdown-item>
                </el-dropdown-menu>
              </template>
            </el-dropdown>
          </div>

          <div class="first-list">
            <div class="item" v-for="(item, index) in 4" :key="index">
              <div class="image">
                <img src="../assets/images/book1.jpg" alt />
              </div>
              <div class="right-box">
                <div class="title-box top10 space-between">
                  <div class="title-header">《法老的聖眷：內弗爾卡拉的召喚》</div>
                </div>

                <div class="content-box content-box-name top10">作者名字</div>

                <div class="dis-row gong-tips content-box top10">
                  【公告】作品即將轉為付费閱部
                  <div class="point-red">
                    <span>·</span>有更新
                  </div>
                </div>

                <div class="content-box top10 space-between" v-if="index == 0">
                  <div>3分钟前</div>
                  <div class="baifen-number">0%</div>
                </div>
                <div class="content-box top10 space-between" v-if="index == 1">
                  <div>2小时前</div>
                  <div class="baifen-number">0%</div>
                </div>
                <div class="content-box top10 space-between" v-if="index == 2">
                  <div>month-day</div>
                  <div class="baifen-number">0%</div>
                </div>
                <div class="content-box top10 space-between" v-if="index == 3">
                  <div>year-month-day</div>
                  <div class="baifen-number">0%</div>
                </div>
              </div>

              <!-- <el-text class="h5" truncated>藍光 Hikari Aoi</el-text> -->
              <!-- <el-text class="p" line-clamp="2">（第三十二章）來自冥神內爾伽勒的救贖</el-text> -->
            </div>
            <!-- <div class="item">
              <div class="image">
                <img src="../assets/images/book1.jpg" alt />
              </div>
              <div class="text">
                <el-text class="h3" truncated>
                  《法老的聖眷：內弗爾卡拉的召喚》The Royal Grace from Great
                  Pharaoh
                </el-text>
                <el-text class="h5" truncated>藍光 Hikari Aoi</el-text>
                <el-text class="p" line-clamp="2">（第三十二章）來自冥神內爾伽勒的救贖</el-text>
              </div>
            </div>
            <div class="item">
              <div class="image">
                <img src="../assets/images/book1.jpg" alt />
              </div>
              <div class="text">
                <el-text class="h3" truncated>
                  《法老的聖眷：內弗爾卡拉的召喚》The Royal Grace from Great
                  Pharaoh
                </el-text>
                <el-text class="h5" truncated>藍光 Hikari Aoi</el-text>
                <el-text class="p" line-clamp="2">（第三十二章）來自冥神內爾伽勒的救贖</el-text>
              </div>
            </div>-->
          </div>
        </el-tab-pane>
        <el-tab-pane label="插画" name="three">
          <div class="dis-flex">
            <el-dropdown trigger="click">
              <span class="el-dropdown-link">
                最近收藏
                <el-icon class="el-icon--right" :size="16">
                  <ArrowDown />
                </el-icon>
              </span>
              <template #dropdown>
                <el-dropdown-menu>
                  <el-dropdown-item>最近收藏</el-dropdown-item>
                  <el-dropdown-item>最近更新</el-dropdown-item>
                </el-dropdown-menu>
              </template>
            </el-dropdown>
          </div>

          <div class="first-list">
            <div class="item" v-for="(item, index) in 4" :key="index">
              <div class="image">
                <img src="../assets/images/book1.jpg" alt />
              </div>
              <div class="right-box">
                <div class="title-box top10 space-between">
                  <div class="title-header">《法老的聖眷：內弗爾卡拉的召喚》</div>
                </div>

                <div class="content-box content-box-name top10">作者名字</div>

                <div class="dis-row gong-tips content-box top10">
                  【公告】作品即將轉為付费閱部
                  <div class="point-red">
                    <span>·</span>有更新
                  </div>
                </div>

                <div class="content-box top10 space-between" v-if="index == 0">
                  <div>3分钟前</div>
                  <div class="baifen-number">0%</div>
                </div>
                <div class="content-box top10 space-between" v-if="index == 1">
                  <div>2小时前</div>
                  <div class="baifen-number">0%</div>
                </div>
                <div class="content-box top10 space-between" v-if="index == 2">
                  <div>month-day</div>
                  <div class="baifen-number">0%</div>
                </div>
                <div class="content-box top10 space-between" v-if="index == 3">
                  <div>year-month-day</div>
                  <div class="baifen-number">0%</div>
                </div>
              </div>

              <!-- <el-text class="h5" truncated>藍光 Hikari Aoi</el-text> -->
              <!-- <el-text class="p" line-clamp="2">（第三十二章）來自冥神內爾伽勒的救贖</el-text> -->
            </div>
            <!-- <div class="item">
              <div class="image">
                <img src="../assets/images/book1.jpg" alt />
              </div>
              <div class="text">
                <el-text class="h3" truncated>
                  《法老的聖眷：內弗爾卡拉的召喚》The Royal Grace from Great
                  Pharaoh
                </el-text>
                <el-text class="h5" truncated>藍光 Hikari Aoi</el-text>
                <el-text class="p" line-clamp="2">（第三十二章）來自冥神內爾伽勒的救贖</el-text>
              </div>
            </div>
            <div class="item">
              <div class="image">
                <img src="../assets/images/book1.jpg" alt />
              </div>
              <div class="text">
                <el-text class="h3" truncated>
                  《法老的聖眷：內弗爾卡拉的召喚》The Royal Grace from Great
                  Pharaoh
                </el-text>
                <el-text class="h5" truncated>藍光 Hikari Aoi</el-text>
                <el-text class="p" line-clamp="2">（第三十二章）來自冥神內爾伽勒的救贖</el-text>
              </div>
            </div>-->
          </div>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script setup>
import Header from "../components/Header.vue";
import { Flag, BellFilled, ChatDotRound } from "@element-plus/icons-vue";
import {
  ArrowLeftBold,
  Setting,
  EditPen,
  ArrowDown,
  Sort,
  MoreFilled,
  View,
  Tickets
} from "@element-plus/icons-vue";
import { ref } from "vue";
const activeName = ref("first");
</script>

<style lang="scss" scoped>
.dis-flex {
  display: inline-flex;
  width: 100%;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.box {
  background: #ffffff;
}

.el-tabs {
  margin: 0 auto;
  // width: 100%;
  max-width: 80rem;

  .el-tabs__nav-scroll {
    max-width: 512px;
  }
}

.content {
  width: 100% !important;

  h2 {
    height: 64px;
    line-height: 64px;
    text-align: center;
  }

  .first-list {
    width: 100% !important;

    .item {
      display: inline-flex;

      margin-top: 1rem;
      width: 31%;
      margin-left: 2%;

      .right-box {
        width: 100%;
        margin-left: 1rem;

        .content-box {
          color: #2d3748;
          font-size: 0.8rem;
        }

        .point-red {
          color: #fe8674;
        }

        .title-box {
          width: 100%;

          .title-header {
            font-size: 0.875rem;
            color: #2d3748;
            font-weight: 500;
            letter-spacing: 0.05em;
          }

          .baifen-number {
            color: #fe8674;
            width: 30%;
          }
        }

        .content-box-name {
          color: #2d3748;
          font-size: 0.75rem;
          font-weight: 400;

        }

        .gong-tips {
          color: #2d3748;
          font-size: 0.75rem;
          font-weight: 400;
        }

        .content-box {
          color: #2d3748;
          font-size: 0.75rem;
          font-weight: 400;
        }
      }
    }
  }

  .baifen-number {
    color: #fe8674;
    width: 30%;
    margin-top: 2rem;
    text-align: right;
    margin-right: 23px;
  }

  .third-list {
    .item {
      background: #f7fafc;

      .author {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-top: 8px;

        p {
          font-size: 14px;
          font-weight: 400;
          line-height: 2;
          color: #2d3748;
        }
      }
    }
  }
}

/* 平板设备 */
@media screen and (max-width: 992px) {}

/* 移动设备 */
@media screen and (max-width: 768px) {
  .item {
    display: inline-flex;
    flex-direction: row !important;
    margin-top: 1rem;
    width: 100% !important;
    margin-left: 2%;
  }

  .el-tabs{
    width: 100% !important;
  }

  .dis-flex{
    width: 92%;
    margin-left: 4%;
  }
}

/* 小屏幕手机 */
@media screen and (max-width: 480px) {
  .item {
    display: inline-flex;
    flex-direction: row !important;
    margin-top: 1rem;
    width: 100%;
    margin-left: 2%;
  }

  .el-tabs{
    width: 100% !important;
  }

  .dis-flex{
    width: 92%;
    margin-left: 4%;
  }
}
</style>